package ejercicios;

import interfaces.tests.CountWords;

public class CountWordsImpl implements CountWords {
	public int countWords(String s) {
		int words = 0;
		for (int index = 0; index < s.length(); index++){
			if (!Character.isWhitespace(s.charAt(index))){
				words++;
			}
		}
		return words;
    }
}